<%# locals: (tag:) -%>
<%= form_with model: tag, url: tag.persisted? ? update_tag_path : tags_path, method: :post do |f| %>
  <div class="labelled_grid">
    <%= f.label :tag, 'Name', class: 'required' %>
    <%= f.text_field :tag  %>

    <%= f.label :category_name, 'Category' %>
    <%= f.select :category_name, options_for_select(Category.pluck(:category), tag.category_name) %>

    <%= f.label :description, 'Description' %>
    <%= f.text_field :description %>

    <%= f.label :permit_by_new_users, 'Permit by new users', :class => "for_checkbox" %>
    <%= f.check_box :permit_by_new_users %>

    <%= f.label :privileged, 'Privileged', :class => "for_checkbox" %>
    <%= f.check_box :privileged %>

    <%= f.label :is_media, 'Is Media', :class => "for_checkbox" %>
    <%= f.check_box :is_media %>

    <%= f.label :active, 'Active', :class => "for_checkbox" %>
    <%= f.check_box :active %>

    <%= f.label :hotness_mod, 'Hotness Mod' %>
    <%= f.number_field :hotness_mod, step: 0.01 %>
  </div>
  <%= f.submit tag.persisted? ? 'Update Tag' : 'Create Tag' %>
<% end %>
